import React, {useEffect} from 'react';
import Images from '../images/images';
import screen from '../utils/screen';
import {ImageBackground, StyleSheet,View} from 'react-native';


const scale = 52 / 96

const Battery = ({battery,style})=>{


    useEffect(()=>{

        return ()=>{

        }
    },[])


    return (
        <ImageBackground
            source={Images.battery}
            imageStyle={{width:screen.PIXEL_50,height:screen.PIXEL_50 * scale}}
            style={[style,styles.container ]}>

            <View style={{flex:1,backgroundColor:'#00CE5B',marginRight:(screen.PIXEL_40 ) * (100 - battery) / 100}}/>

        </ImageBackground>
    )
}

export default Battery

const styles = StyleSheet.create({
    container:{
        width:screen.PIXEL_50,height:screen.PIXEL_50 * scale,padding:2,paddingRight:3
    },
    content:{

    }
})
